<html>
<head>
<title>Test Server Values and LayOuts</title>
</head>
<body>
<?php
echo "<h1>Server Values and Layout Test</h1> <br>";
echo "User Agent: "; echo $_SERVER['HTTP_USER_AGENT']; echo "<br>";

echo "<br><u> General Information</u><br>";
echo "Trusted: "; echo $_SERVER['HTTP_EVE_TRUSTED']; echo"<br>";
echo "Serverip: "; echo $_SERVER['HTTP_EVE_SERVERIP']; echo "<br>";

echo "<br><u>Character Information</u><br>";
echo "Character Name: "; echo $_SERVER['HTTP_EVE_CHARNAME']; echo "<br>";
echo "Charid: "; echo $_SERVER['HTTP_EVE_CHARID']; echo " <br>";
echo "Region Name: "; echo $_SERVER['HTTP_EVE_REGIONNAME']; echo "<br>";
echo "Constellation: "; echo $_SERVER['HTTP_EVE_CONSTELLATIONNNAME']; echo "<br>";
echo "Solar System Name: "; echo $_SERVER['HTTP_EVE_SOLARSYSTEMNAME']; echo"<br>";
echo "Nearest Location: "; echo $_SERVER['HTTP_EVE_NEARESTLOCATION']; echo "<br>";
echo "Station Name: "; echo $_SERVER['HTTP_EVE_STATIONNAME']; echo "<br>";

echo "<br><u>Corporation Information</u><br>";
echo "Corp Name: "; echo $_SERVER['HTTP_EVE_CORPNAME']; echo  "<br>";
echo "CorpId: "; echo $_SERVER['HTTP_EVE_CORPID']; echo "<br>";
echo "Corp Role: "; echo $_SERVER['HTTP_EVE_CORPROLE']; echo "<br>";

echo "<br><u>Alliance Info</u><br>";
echo "Alliance Name: "; echo $_SERVER['HTTP_EVE_ALLIANCENAME']; echo "<br>";
echo "Alliance id: "; echo $_SERVER['HTTP_EVE_ALLIANCEID']; echo "<br>";

?>
<?php

$char = $_SERVER['HTTP_EVE_CHARNAME'];
$roles = (float)$_SERVER['HTTP_EVE_CORPROLE']; // CORPROLE_ID

echo "Calculating role for $char<p>";
                           //9223372036854775807
                           //72057594037927809 old director
if (($roles & 1) || $roles == 9223372036854775807) {
echo "$char is a Director<BR>";
}

if ($roles & (128)) {
echo "$char is a Personnel Manager<BR>";
}

if ($roles & (256)) {
echo "$char is an Accountant<BR>";
}

if ($roles & (512)) {
echo "$char is a Security Manager<BR>";
}

if ($roles & (1024)) {
echo "$char is a Factory Manager<BR>";
}

if ($roles & (2048)) {
echo "$char is a Station Manager<BR>";
}

if ($roles & (4096)) {
echo "$char is an Auditor<BR>";
}

if ($roles & (8192)) {
echo "$char Can take from division 1 hangar<BR>";
}

if ($roles & (16384)) {
echo "$char Can take from division 2 hangar<BR>";
}

if ($roles & (32768)) {
echo "$char Can take from division 3 hangar<BR>";
}

if ($roles & (65536)) {
echo "$char Can take from division 4 hangar<BR>";
}

if ($roles & (131072)) {
echo "$char Can take from division 5 hangar<BR>";
}

if ($roles & (262144)) {
echo "$char Can take from division 6 hangar<BR>";
}

if ($roles & (524288)) {
echo "$char Can take from division 7 hangar<BR>";
}

if ($roles & (1048576)) {
echo "$char Can query division 1 hangar<BR>";
}

if ($roles & (2097152)) {
echo "$char Can query division 2 hangar<BR>";
}

if ($roles & (4194304)) {
echo "$char Can query division 3 hangar<BR>";
}

if ($roles & (8388608)) {
echo "$char Can query division 4 hangar<BR>";
}

if ($roles & (16777216)) {
echo "$char Can query division 5 hangar<BR>";
}

if ($roles & (33554432)) {
echo "$char Can query division 6 hangar<BR>";
}

if ($roles & (67108864)) {
echo "$char Can query division 7 hangar<BR>";
}

if ($roles & (134217728)) {
echo "$char Can take from division 1 accounts<BR>";
}

if ($roles & (268435456)) {
echo "$char Can take from division 2 accounts<BR>";
}

if ($roles & (536870912)) {
echo "$char Can take from division 3 accounts<BR>";
}

if ($roles & (1073741824)) {
echo "$char Can take from division 4 accounts<BR>";
}

if ($roles & (2147483648)) {
echo "$char Can take from division 5 accounts<BR>";
}

if ($roles & (4294967296)) {
echo "$char Can take from division 6 accounts<BR>";
}

if ($roles & (8589934592)) {
echo "$char Can take from division 7 accounts<BR>";
}

if ($roles & (17179869184)) {
echo "$char Can query division 1 accounts<BR>";
}

if ($roles & (34359738368)) {
echo "$char Can query division 2 accounts<BR>";
}

if ($roles & (68719476736)) {
echo "$char Can query division 3 accounts<BR>";
}

if ($roles & (137438953472)) {
echo "$char Can query division 4 accounts<BR>";
}

if ($roles & (274877906944)) {
echo "$char Can query division 5 accounts<BR>";
}

if ($roles & (549755813888)) {
echo "$char Can query division 6 accounts<BR>";
}

if ($roles & (1099511627776)) {
echo "$char Can query division 7 accounts<BR>";
}

if ($roles & (2199023255552)) {
echo "$char Equipment config/Deploy space<BR>";
}
?>
</body>
</html>